﻿<html> 
<head> 
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
<title>Museu Aberto: iD Bairro - SP#02</title> 
<script src="js/data.js"></script> 
<script src="http://www.google.com/jsapi"></script> 
<script type="text/javascript">google.load("jquery", "1");</script> 
<script type="text/javascript"> 
google.load("maps", "3", {other_params:"sensor=false"});
</script> 
<script src="js/smartinfowindow.js"></script> 
<script>
var map, cloud;
var counter = 0;
var markers = [];

function init() {
  var options = {
    zoom: 15,
    center: new google.maps.LatLng(0, 0),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById('map_canvas'), options);
  for (var i = 0; i < 6; i++) {
    makeMarker(locations[i]);
  }
  centerMap();
}

function centerMap() {
  map.setCenter(markers[markers.length-1].getPosition());
}


function makeMarker(location) {
  var markerOptions = {map: map, position: new google.maps.LatLng(location.lat, location.lng)};
  var marker = new google.maps.Marker(markerOptions);
  markers.push(marker);
  var content = '<div style="text-align: center; font-size:14px;"><center><b>' + location.full_location + '</b></center><img width="240" height="180" src="http://mw2.google.com/mw-panoramio/photos/small/' + location.panoramio_id + '.jpg"/><div style="margin: auto; text-align: right; width: 240px; font-size:12px;" class="linkbutton">Foto: <a href="http://qrcult.tk/' + location.qrcult_author + '" target="_blank">' + location.panoramio_author_name + '</a></div><br/><div class="linkbutton" style="text-align: center; font-size:13px;"> <a href="http://qrcult.tk/' + location.qrcult + '" target="_blank">Ponto multicultural iD Bairro SP BOM RETIRO</a></div><br/><div style="text-align: center; font-size:12px;" class="linkbutton"><a href="http://qrcult.tk/' + location.qrcult + '.qrcode" target="_blank">QRCode</a> - <a href="http://www.google.com/search?q=' + location.full_location + '" target="_blank">Pesquisar este local</a></div></div>';

  google.maps.event.addListener(marker, 'click', function(e) {
    var infobox = new SmartInfoWindow({position: marker.getPosition(), map: map, content: content});
  });
}
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24900390-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body onload="init()">
  <div id="map_canvas" style="width:1000px; height:600px;"></div>
</body>
</html>
